home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / zindent7.zip / ZINUSER.INC < prev    next >
Text File  |  1987-03-30  |  6KB  |  221 lines

  1.  
  2. (*******************************************************************)
  3. (*                                                                 *)
  4. (* Include File                                                    *)
  5. (* System User Entry,  v. 0800am, sun, 28.Mar.87, Glen Ellis       *)
  6. (*                                                                 *)
  7. (*******************************************************************)
  8.  
  9.  
  10. (* *)
  11. (*
  12. (* purpose:
  13. (*     accept user data as if from commandline.
  14. (*     operates as if for single source file.
  15. (*     if no filename entry,
  16. (*           then enable documentation
  17. (*
  18. (* *)
  19.  
  20.  
  21.  
  22. (*---------------------------------------------------------------*)
  23.  
  24. begin (* INCLUDE *)
  25.  
  26.    (*---> Header *)
  27.    pClearScreen; (* SysScr.inc *)
  28.  
  29.    (*-----------------------------------------------------------------*)
  30.    (* Apple IIe with CPM v.2.23, "60K", has funny clear screen bug.   *)
  31.    (* Mod for CP/M system file is available from author,              *)
  32.    (* but so is the simple work-around procedure "pClearScreen".      *)
  33.    (*                                                                 *)
  34.    (* other bugs from author:                                         *)
  35.    (* Apple CPM with Sider Hard Drive system (modified CP/M ) has bug.*)
  36.    (* Mod for CPM.SYS is available to correct I/O problem             *)
  37.    (*     CP/M 2.23 Apple/CPM version, for Reader and Punch devices.  *)
  38.    (*-----------------------------------------------------------------*)
  39.  
  40.    gotoxy(03,05);
  41.    writeln('-------------------------');
  42.    gotoxy(03,06);
  43.    writeln('System User Input Module ');
  44.  
  45.    (*---> #1 parameter *)
  46.  
  47.    IF (SysCmdUser) and (SysCmdUserFile) then (* fetch it *)
  48.    begin
  49.  
  50.       SysInFileName := ' ';
  51.  
  52.       (* force user filename entry *)
  53.       REPEAT
  54.          
  55.          gotoxy(03,08);
  56.          writeln
  57.          ('Enter Source Filename or "?" for Documentation screens.');
  58.          gotoxy(03,09);
  59.          write('   Enter : '); readln(SysInfileName);
  60.  
  61.          (* accept <CR> entry for 'documentation' selection *)
  62.          if (length(SysInFileName) = 0 )
  63.             then SysInFileName := '?';
  64.  
  65.       UNTIL SysInFileName > ' ' ;
  66.  
  67.       IF (SysInFileName = '?') then
  68.       begin
  69.          SysCmdUser := false;
  70.          SysInFileName := 'Documentation';
  71.          (* always for single file mode *)
  72.       end;
  73.  
  74.       (* Single file mode defaults *)
  75.       SysInSource[1] := SysInFilename;
  76.       SysInSourceCnt := 0;
  77.       SysInSourceMax := 1; (* only for compatibility *)
  78.  
  79.    end; (* IF (SysCmdUser) and (SysCmdUserFile) then (* fetch it *)
  80.  
  81.  
  82.    (*--------------------------------*)
  83.  
  84.    IF (SysCmdUser) and (SysCmdUserParm) then
  85.    begin  (* SysCmdUser *)
  86.  
  87.       
  88.       (*---> # 2 parameter *) (* Indent *)
  89.       
  90.       SysIndentNum := 0;
  91.       Repeat
  92.          
  93.          (* since, indent procedure does not accept 0, use it for flag. *)
  94.          SysIndentNum := 0;
  95.          
  96.          gotoxy(03,10);
  97.          writeln('Left Margin Indent Tab Length > 0.');
  98.          gotoxy(03,11);
  99.          write('   Enter IndentNum, <CR> = 3 : ');
  100.          readln(SysIndentNum);
  101.          
  102.          (* accept <CR> entry as default #3 *)
  103.          (* if no entry, they int.var unchanged *)
  104.          if (SysIndentNum < 1) then SysIndentNum := 3;
  105.          
  106.       Until (SysIndentNum > 0) and (SysIndentNum < 80);
  107.       
  108.       SysIndent := true;
  109.       SysIndentPos := 0;
  110.       
  111.       
  112.       (*---> #3 parameter *) (* Comment *)
  113.       
  114.       gotoxy(03,12);
  115.       writeln('Comment Lines to be Included.');
  116.       gotoxy(03,13);
  117.       write('   Enter <Y/N> <CR=Y> : ');
  118.       readln(SysCharEntry);
  119.       
  120.       SysComment := true ; (* default *)
  121.       
  122.       IF (length(SysCharEntry) > 0)
  123.       then
  124.       IF (upcase(SysCharEntry) = 'N')
  125.       then
  126.       SysComment := false;
  127.       
  128.       
  129.       (*---> #4 parameter *) (* LineCnt *)
  130.       
  131.       gotoxy(03,14);
  132.       writeln('Line Counter.');
  133.       gotoxy(03,15);
  134.       write('   Enter <Y/N> <CR=N> : ');
  135.       readln(SysCharEntry);
  136.       
  137.       SysLineCnt := false; (* default *)
  138.       SysLenMax := 79;
  139.       
  140.       IF (length(SysCharEntry) > 0)
  141.       then
  142.       IF (upcase(SysCharEntry) = 'Y')
  143.       then
  144.       begin
  145.          SysLineCnt := true;
  146.          SysLenMax  := 75;
  147.       end;
  148.       
  149.       
  150.       (*---> #5 parameter *) (* Vertiate *)
  151.       
  152.       gotoxy(03,16);
  153.       writeln('Vertical Line Connections.');
  154.       gotoxy(03,17);
  155.       write('   Enter <Y/N> <CR=N> : ');
  156.       readln(SysCharEntry);
  157.       
  158.       SysVertiate := false; (* default *)
  159.       
  160.       IF (length(SysCharEntry) > 0) then
  161.       IF (upcase(SysCharEntry) = 'Y') then SysVertiate := true;
  162.       
  163.       
  164.       (*---> #6 paramter *)  (* Tracer *)
  165.       
  166.       gotoxy(03,18);
  167.       writeln('Special Programmer Tracer Displays.');
  168.       gotoxy(03,19);
  169.       write('   Enter (Y/N) <CR=N> : ');
  170.       readln(SysCharEntry);
  171.       
  172.       SysPgmTrace := false; (* default *)
  173.       
  174.       IF (length(SysCharEntry) > 0) then
  175.       IF (upcase(SysCharEntry) = 'Y') then SysPgmTrace := true;
  176.       
  177.       (*---> #7 paramter *)  (* PgmMod *)
  178.  
  179.       gotoxy(03,20);
  180.       writeln('Force the System Pgm Mode : <DB> <TP>');
  181.       gotoxy(03,21);
  182.       write  ('Enter selection, <CR> = normal parse : ');
  183.       readln(SysPgmMod);
  184.       
  185.       IF (length(SysPgmMod) > 0) then
  186.       begin
  187.          case (upcase(SysPgmMod[1])) of
  188.             'D' : SysPgmMod := 'DB';
  189.             'T' : SysPgmMod := 'TP';
  190.             else
  191.             begin
  192.                gotoxy(03,21);
  193.                writeln(' Unknown : defaulted to normal.          ');
  194.                SysPgmMod := '  ';
  195.             end;
  196.          end;
  197.       end
  198.       else
  199.       begin
  200.          gotoxy(03,21);
  201.          writeln(' Defaulted to normal');
  202.          SysPgmMod := '  ';
  203.          pDelay1;
  204.       end;
  205.  
  206.       gotoxy(03,22);
  207.       writeln(' SysPgmMod = :',SysPgmMod,':');
  208.       if SysPgmMod = '  ' then writeln('Filename.TYP Parse enabled');
  209.  
  210.    end;  (* IF (SysCmdUser) and (SysCmdUserParm) then (* fetch them *)
  211.  
  212.    writeln;
  213.  
  214.    writeln('--------------------------------------');
  215.    writeln;
  216.    pDelay2;
  217.  
  218. end; (* INCLUDE *)
  219.  
  220. (*******************************************************************)
  221. (*<<<>>>*)